81 文字
1 分
Q. Github Workflowsが落ちたらIssueを作らせたい
continue-on-error
とプリインストールされている gh コマンドを使えば簡単に出来る。
name: Test
on: push
concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true
jobs: test: timeout-minutes: 8 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Test id: test run: | exit 1 continue-on-error: true - name: Create issue run: | gh issue create --assignee "hrdtbs" --title "Issue report" --body "" --repo $GITHUB_REPOSITORY env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: steps.test.outcome == 'failure'
Q. Github Workflowsが落ちたらIssueを作らせたい
https://blog.ohirunewani.com/posts/"github-workflows-create-issue-on-failure"/